<template>
  <view class="home-main">
    <view
      class="nav-item"
      v-for="item in navData"
      :key="item.url"
      @click="handleJumpPage(item)"
    >
      <text>{{ item.title }}</text>
      <text>{{ ">" }}</text>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      navData: [
        {
          title: "tree-picker",
          url: "/pages/treePicker/treePicker",
        },
		{
		  title: "legacy-tree-picker",
		  url: "/pages/treePickerLegacy/treePickerLegacy",
		},
        {
          title: "date-picker",
          url: "/pages/datePicker/datePicker",
        },
        {
          title: "tree-select",
          url: "/pages/treeSelect/treeSelect",
        },
      ],
    };
  },
  methods: {
    handleJumpPage(info) {
      uni.navigateTo({
        url: info.url,
      });
    },
  },
};
</script>

<style lang="scss">
.home-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  .nav-item {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid #eee;
  }
}
</style>
